package com.base.vistter.iframe.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.base.vistter.iframe.entity.SysDepart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface SysDepartMapper extends BaseMapper<SysDepart> {

    @Update("update sys_depart set parent_path= CONCAT(#{path}, ',', id) where parent_like CONCAT(#{parentPath}, ',%')")
    void updateParentPath(@Param("parentPath") String parentPath, @Param("path") String path);

}
